//
// Copyright (c) 2006 Mikhail V. Denisenko.
// All rights reserved.
//
// Module for managing preview window.
//

#include "preview.h"
#include "previewbackend.h"
#include <memory>
#include <boost/thread/thread.hpp>

namespace {
	const char rcs_id[] = "$Id$";
}


using std::auto_ptr;
using boost::thread;


void previewThreadFunc();


struct PreviewState
{
	auto_ptr<thread> thread; // only valid for main thread
	int windowHandle;
	Raster * raster; // weak reference on raster
	RasterLock
} previewState;


void showPreview()
{
	if (!previewState.thread) // need lock???
	{
		previewState.thread.reset(new thread(previewThreadFunc));
	}
}


void hidePreview()
{
}


void updatePreview(Raster * raster)
{
	
}

void previewThreadFunc()
{
}

Raster * lockRaster()
{
}

void unlockRaster(Raster * raster)
{
}
